param([string]$hostheader = "sts.socialconnekt.com")
Write-Host "Host Header: $hostheader"

function Import-509Certificate {    
   
    param([String]$certPath,[String]$certRootStore,[String]$certStore)    
   
    $pfx = new-object System.Security.Cryptography.X509Certificates.X509Certificate2    
    $pfx.import($certPath)    
   
    $store = new-object System.Security.Cryptography.X509Certificates.X509Store($certStore,$certRootStore)   
    $store.open("MaxAllowed")    
    $store.add($pfx)    
    $store.close()    
 }   

$scriptpath = $MyInvocation.MyCommand.Path
$dir = Split-Path $scriptpath
$certpath = $dir + "\" + $hostheader + ".cer"
#write-host $certpath
Import-509Certificate $certpath "LocalMachine" "root" 
